Merk:
Model:
0) { if ($merk != 4) { $query .= "merk=$merk AND "; $criteria_opgegeven = true; } else { $criteria_opgegeven = false; } } //else //{ // if ($merk > 0) // { // $query .= "merk=$merk AND "; // $criteria_opgegeven = true; // } if ($model > 0) { $query .= "model=$model AND "; $criteria_opgegeven = true; } if ($criteria_opgegeven == false) { // die ("
Geeft u a.u.b. ten minste 1 zoek-criteria op!

Zoek opnieuw"); } $query = substr($query, 0, strlen($query) - 4); $query .= "ORDER BY model, type;"; //print "$query
"; // Pre-cache tabel: merk $merk_count = 0; $data = mysql_query("SELECT * FROM merk"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'merk'!"); while ($dat = mysql_fetch_array($data)) { $merken[$merk_count]["ID"] = $dat["ID"]; $merken[$merk_count]["Naam"] = $dat["Naam"]; $merk_count++; } // Pre-cache tabel: model $model_count = 0; $data = mysql_query("SELECT * FROM model"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'model'!"); while ($dat = mysql_fetch_array($data)) { $modellen[$model_count]["ID"] = $dat["ID"]; $modellen[$model_count]["Naam"] = $dat["Naam"]; $model_count++; } // Pre-cache tabel: Type $type_count = 0; $data = mysql_query("SELECT * FROM type"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'type'!"); while ($dat = mysql_fetch_array($data)) { $typen[$type_count]["ID"] = $dat["ID"]; $typen[$type_count]["Naam"] = $dat["Omschrijving"]; $type_count++; } // Pre-cache tabel: Uitvoering $uitvoering_count = 0; $data = mysql_query("SELECT * FROM uitvoering"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'uitvoering'!"); while ($dat = mysql_fetch_array($data)) { $uitvoeringen[$uitvoering_count]["ID"] = $dat["ID"]; $uitvoeringen[$uitvoering_count]["Naam"] = $dat["Naam"]; $uitvoering_count++; } // Pre-cache tabel: Koetswerk $koetswerk_count = 0; $data = mysql_query("SELECT * FROM koetswerk"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'koetswerk'!"); while ($dat = mysql_fetch_array($data)) { $koetswerken[$koetswerk_count]["ID"] = $dat["ID"]; $koetswerken[$koetswerk_count]["Naam"] = $dat["Naam"]; $koetswerk_count++; } $data = mysql_query($query); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'auto'!".mysql_error()); $cnt = 0; while ($dat = mysql_fetch_array($data)) { $cnt++; ?> "; print $merken[zoek_item($dat["Merk"], $merk_count, $merken)]["Naam"] . " " .$modellen[zoek_item($dat["Model"], $model_count, $modellen)]["Naam"] . " " . $typen[zoek_item($dat["Type"], $type_count, $typen)]["Naam"] . " " . $koetswerken[zoek_item($dat["Koetswerk"], $koetswerk_count, $koetswerken)]["Naam"] . " " . $uitvoeringen[zoek_item($dat["Uitvoering"], $uitvoering_count, $uitvoeringen)]["Naam"]; ?>
Prijs:
//
?>
KM-stand:
Datum deel I:
"; print "Foto"; } else { print " "; } ?>

Sorry, er zijn geen resultaten gevonden.

Zoek opnieuw"); } else if ($action=="search_details") { if (!$id) die("Selecteer een auto!"); $query = "SELECT * FROM auto WHERE ID='$id'"; //print "$query
"; // Pre-cache tabel: model $model_count = 0; $data = mysql_query("SELECT * FROM model"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'model'!"); while ($dat = mysql_fetch_array($data)) { $modellen[$model_count]["ID"] = $dat["ID"]; $modellen[$model_count]["Naam"] = $dat["Naam"]; $model_count++; } // Pre-cache tabel: merk $merk_count = 0; $data = mysql_query("SELECT * FROM merk"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'merk'!"); while ($dat = mysql_fetch_array($data)) { $merken[$merk_count]["ID"] = $dat["ID"]; $merken[$merk_count]["Naam"] = $dat["Naam"]; $merk_count++; } // Pre-cache tabel: Brandstof $brandstof_count = 0; $data = mysql_query("SELECT * FROM brandstof"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'brandstof'!"); while ($dat = mysql_fetch_array($data)) { $brandstoffen[$brandstof_count]["ID"] = $dat["ID"]; $brandstoffen[$brandstof_count]["Naam"] = $dat["Naam"]; $brandstof_count++; } // Pre-cache tabel: Type $type_count = 0; $data = mysql_query("SELECT * FROM type"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'type'!"); while ($dat = mysql_fetch_array($data)) { $typen[$type_count]["ID"] = $dat["ID"]; $typen[$type_count]["Naam"] = $dat["Omschrijving"]; $type_count++; } // Pre-cache tabel: Koetswerk $koetswerk_count = 0; $data = mysql_query("SELECT * FROM koetswerk"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'koetswerk'!"); while ($dat = mysql_fetch_array($data)) { $koetswerken[$koetswerk_count]["ID"] = $dat["ID"]; $koetswerken[$koetswerk_count]["Naam"] = $dat["Naam"]; $koetswerk_count++; } // Pre-cache tabel: Transmissie $transmissie_count = 0; $data = mysql_query("SELECT * FROM transmissie"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'transmissie'!"); while ($dat = mysql_fetch_array($data)) { $transmissies[$transmissie_count]["ID"] = $dat["ID"]; $transmissies[$transmissie_count]["Naam"] = $dat["Naam"]; $transmissie_count++; } // Pre-cache tabel: Kleur $kleur_count = 0; $data = mysql_query("SELECT * FROM kleur"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'kleur'!"); while ($dat = mysql_fetch_array($data)) { $kleuren[$kleur_count]["ID"] = $dat["ID"]; $kleuren[$kleur_count]["Naam"] = $dat["Naam"]; $kleur_count++; } // Pre-cache tabel: Accessoires $accessoire_count = 0; $data = mysql_query("SELECT * FROM accessoires"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'accessoires'!"); while ($dat = mysql_fetch_array($data)) { $accessoires[$accessoire_count]["ID"] = $dat["ID"]; $accessoires[$accessoire_count]["Naam"] = $dat["Naam"]; $accessoire_count++; } // Pre-cache tabel: Meeruitvoeringen $meeruitvoering_count = 0; $data = mysql_query("SELECT * FROM meeruitvoeringen"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'meeruitvoeringen'!"); while ($dat = mysql_fetch_array($data)) { $meeruitvoeringen[$meeruitvoering_count]["ID"] = $dat["ID"]; $meeruitvoeringen[$meeruitvoering_count]["Naam"] = $dat["Naam"]; $meeruitvoering_count++; } // Pre-cache tabel: Uitvoering $uitvoering_count = 0; $data = mysql_query("SELECT * FROM uitvoering"); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'uitvoering'!"); while ($dat = mysql_fetch_array($data)) { $uitvoeringen[$uitvoering_count]["ID"] = $dat["ID"]; $uitvoeringen[$uitvoering_count]["Naam"] = $dat["Naam"]; $uitvoering_count++; } $data = mysql_query($query); if (!$data) die("FATAL ERROR: Could not SELECT FROM 'auto'!".mysql_error()); $cnt = 0; while ($dat = mysql_fetch_array($data)) { // $cnt++; // print "
"; // if ($model) print ""; // if ($type) print ""; // if ($kenteken) print ""; // if ($datumdeel1) print ""; // print ""; // print "
"; print ""; print ""; print (""; print ""; print ""; print "
"; print $merken[zoek_item($dat["Merk"], $merk_count, $merken)]["Naam"] . " " .$modellen[zoek_item($dat["Model"], $model_count, $modellen)]["Naam"] . " " . $typen[zoek_item($dat["Type"], $type_count, $typen)]["Naam"] . " " . $koetswerken[zoek_item($dat["Koetswerk"], $koetswerk_count, $koetswerken)]["Naam"] . " " . $uitvoeringen[zoek_item($dat["Uitvoering"], $uitvoering_count, $uitvoeringen)]["Naam"]; print "
"; if ($dat["Foto"] != "") { print "
"; } else { print "
"; } print ("
Datum deel I:"); if ($dat["Datumdeel1"] != 0) { print $dat["Datumdeel1"]; } else { print "N/A"; } print ("
Kilometerstand:"); if ($dat["Kilometerstand"] != "") { print mooi_getal($dat["Kilometerstand"]); } else { print "N/A"; } print ("
Brandstof:"); print $brandstoffen[zoek_item($dat["Brandstof"], $brandstof_count, $brandstoffen)]["Naam"]; print ("
Koetswerk:"); print $koetswerken[zoek_item($dat["Koetswerk"], $koetswerk_count, $koetswerken)]["Naam"]; print ("
Transmissie:"); print $transmissies[zoek_item($dat["Transmissie"], $transmissie_count, $transmissies)]["Naam"]; print (" 
BTW Verrekenbaar:"); if ($dat["BTW"] == 1) print "Ja"; else print "Nee"; print ("
Aanwezige opties:"); print $dat["AccX"]; print "
Garantie:"); print ucwords($dat["Garantie"]); print "
 
Venster sluiten

"; } // if ($cnt==0) // print "
Sorry, er zijn geen resultaten gevonden.

Zoek opnieuw"; } send_footer(); ?>